package com.frx.sort;


/**
 * Created by xurenfeng on 2019/2/15.
 */
public abstract class Sort<T extends Comparable<T>> {

    public abstract void sort(T[] nums);

    //进行比较的函数
    protected boolean less(T v,T w){
        return v.compareTo(w)<0;
    }
    //进行交换的函数
    protected void swap(T[] a,int i,int j){
        T t = a[j];
        a[j] = a[i];
        a[i] = t;
    }
}
